<script setup>
import { onMounted } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter();
console.log('我是route', router)
const _isMobile = ()=> {
	 let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
	 return flag;
}

onMounted(async () => {
    if (_isMobile()) {
      router.replace('/index');
    } else {
      router.replace('/homePagePc');
    }
});


</script>

<template>
  <div>
      <router-view :key="$route.fullPath"></router-view>
  </div>
 
</template>

<style scoped>

</style>
